package com.ruoyi.wretchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wretchant.mapper.MetaBookReadNoteMapper;
import com.ruoyi.wretchant.domain.MetaBookReadNote;
import com.ruoyi.wretchant.service.IMetaBookReadNoteService;
import com.ruoyi.common.core.text.Convert;

/**
 * 读书笔记Service业务层处理
 * 
 * @author 简简单单 Online zuozuo
 * @date 2021-08-15
 */
@Service
public class MetaBookReadNoteServiceImpl implements IMetaBookReadNoteService 
{
    @Autowired
    private MetaBookReadNoteMapper metaBookReadNoteMapper;

    /**
     * 查询读书笔记
     * 
     * @param id 读书笔记主键
     * @return 读书笔记
     */
    @Override
    public MetaBookReadNote selectMetaBookReadNoteById(Long id)
    {
        return metaBookReadNoteMapper.selectMetaBookReadNoteById(id);
    }

    /**
     * 查询读书笔记列表
     * 
     * @param metaBookReadNote 读书笔记
     * @return 读书笔记
     */
    @Override
    public List<MetaBookReadNote> selectMetaBookReadNoteList(MetaBookReadNote metaBookReadNote)
    {
        return metaBookReadNoteMapper.selectMetaBookReadNoteList(metaBookReadNote);
    }

    /**
     * 新增读书笔记
     * 
     * @param metaBookReadNote 读书笔记
     * @return 结果
     */
    @Override
    public int insertMetaBookReadNote(MetaBookReadNote metaBookReadNote)
    {
        return metaBookReadNoteMapper.insertMetaBookReadNote(metaBookReadNote);
    }

    /**
     * 修改读书笔记
     * 
     * @param metaBookReadNote 读书笔记
     * @return 结果
     */
    @Override
    public int updateMetaBookReadNote(MetaBookReadNote metaBookReadNote)
    {
        return metaBookReadNoteMapper.updateMetaBookReadNote(metaBookReadNote);
    }

    /**
     * 批量删除读书笔记
     * 
     * @param ids 需要删除的读书笔记主键
     * @return 结果
     */
    @Override
    public int deleteMetaBookReadNoteByIds(String ids)
    {
        return metaBookReadNoteMapper.deleteMetaBookReadNoteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除读书笔记信息
     * 
     * @param id 读书笔记主键
     * @return 结果
     */
    @Override
    public int deleteMetaBookReadNoteById(Long id)
    {
        return metaBookReadNoteMapper.deleteMetaBookReadNoteById(id);
    }
}
